import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import locale from 'element-plus/dist/locale/zh-cn.js'
import router from '@/router'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";

const app = createApp(App)

//创建pinia
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate) //pinia持久化插件

app.use(pinia)

app.use(router)
app.use(ElementPlus,{locale})
// 创建事件总线

app.mount('#app')